const Koa = require('koa');
const app = new Koa();
const serve = require('koa-static');
app.use(serve(__dirname + '/static'));
const koa_body = require("koa-body")

const my_Router = require("./my_router/my_router")


app.use(koa_body({
    multipart: true,
    formidable: {
        maxFileSize: 1024 * 1024 * 20
    }
}))

app
   .use(my_Router.router.routes())
   .use(my_Router.router.allowedMethods());

app.listen(3000);
console.log("我的服务器跑起来了。。。3000")